package com.itheima.edu.exception;

public class ExceptiongTest {
    public static void main(String[] args) {
        method();
        System.out.println("我执行了！");
    }

    public static void method() {
        try{
            int[] arr = {1,2,3,4,5};
            System.out.println(arr[10]);
        }catch(ArrayIndexOutOfBoundsException e){
//            String message = e.getMessage();
//            System.out.println(message);
//            String s = e.toString();
//            System.out.println(s);
            e.printStackTrace();
        }
    }
}
